import Mock from 'mockjs'

Mock.Random.extend({
  store_trade: function () {
    const arr = ['减肥中心', '七七酒店', '私人影院', '盲人按摩']
    return this.pick(arr)
  }
})
Mock.mock('/sourcecheck', {
  'list|5': [
    {
      'id|+1': 1,
      name: '@cword(2,4)',
      mat_img: '@Image()',
      category: '@store_trade()',
      category1: '@store_trade()',
      'price|99-999': 99,
      'uploader_id|1-999999': 1,
      phone: '181xxxxxxxx',
      date: '@date()',
      'state|1-2': false,
      auditDate: '@date()',
      comment: ''
    }
  ]
})

Mock.mock('/usersource', {
  'list|5': [
    {
      'id|+1': 1,
      name: '@cword(2,4)',
      mat_img: '@Image()',
      category: '@cword(4,8)',
      'price|99-999': 99,
      'uploader_id|1-999999': 1,
      phone: '181xxxxxxxx',
      date: '@date()',
      'sell|1-999999': 99,
      'earnings|0-999999': 0
    }
  ]
})
